package com.neu.canteen.service.impl;

import java.util.List;

import com.neu.canteen.dao.FoodDao;
import com.neu.canteen.dao.impl.FoodDaoImpl;
import com.neu.canteen.domain.Food;
import com.neu.canteen.service.FoodService;

public  class FoodServiceImpl implements FoodService{

	private FoodDao foodDao;
	
	public FoodServiceImpl(){
		this.foodDao = new FoodDaoImpl();
	}
 
	@Override
	public List<Food> findByTypeId(int typeId) {
		return foodDao.findByTypeId(typeId);
	}

	@Override
	public Food findById(int foodId) {
		return foodDao.findById(foodId);
	}

	@Override
	public int add(Food food) {
		// TODO Auto-generated method stub
		return foodDao.add(food);
	}

	@Override
	public int deleteFoodId(int id) {
		// TODO Auto-generated method stub
		return foodDao.deleteFoodId(id);
	}

	@Override
	public int updataFood(Food food) {
		// TODO Auto-generated method stub
		return foodDao.updataFood(food);
	}
	
	
}
